import request from '../utils/request.js';

export default {
  // 获取机构下面的栏目树
  GetCatgTree: (params) => request('/wgw/v3/CatgWeb/GetCatgTree', { method: 'GET', params }),

  // 分页获取栏目
  GetWGWResPage: (params) => request('/wgw/v3/WGWResWeb/GetWGWResPage', { method: 'GET', params }),

  // 获取单个信息
  GetWGWRes: (params) => request('/wgw/v3/WGWResWeb/GetWGWRes', { method: 'GET', params }),

  // 保存
  SaveWGWRes: (params) =>
    request('/wgw/v3/WGWResWeb/SaveWGWRes', { method: 'POST', body: { ...params } }),

  // 删除
  DeleteWGWRes: (params) => request('/wgw/v3/WGWResWeb/DeleteWGWRes', { method: 'POST', params }),

  // 上下架处理
  UpdateWGWResStatus: (params) =>
    request('/wgw/v3/WGWResWeb/UpdateWGWResStatus', { method: 'POST', params }),

  // 获取栏目状态
  GetCatgStatusList: (params) =>
    request('/wgw/v3/WGWResWeb/GetCatgStatusList', { method: 'GET', params }),

  // 获取资源状态
  GetWGWResStatusList: (params) =>
    request('/wgw/v3/WGWResWeb/GetWGWResStatusList', { method: 'GET', params }),

  // 获取资源类型
  GetResTypeList: (params) =>
    request('/wgw/v3/WGWResWeb/GetResTypeList', { method: 'GET', params }),

  // 获取栏目封面比例
  GetCatgThumbRatio: (params) =>
    request('/wgw/v3/CatgWeb/GetCatgThumbRatio', { method: 'GET', params }),

  // 设置置顶
  SetWGWResTop: (params) => request('/wgw/v3/WGWResWeb/SetWGWResTop', { method: 'POST', params }),

};
